class Feed::InstallCreated < Feed
  validates :order_item_id,
    :installation_id,
    :presence => true

  belongs_to :installation, :dependent => :destroy

  def code
    ActiveSupport::StringInquirer.new('has_been_sent_to_installer')
  end

  def short_desc
    "#{installation.installer_full_name}于#{
    installation.installed_on}<b>上门安装</b>【#{
    installation.order_item.furniture_code}-#{
    installation.order_item.furniture_name} => #{
    installation.has_been_sent_to_installer_count}件】"
  end

  def remark
    installation.remark
  end

  def related_one
    installation
  end
  
  def related_html_id
    "related_installation_#{installation.id}"
  end
  
  def related_type
    "related_installation"
  end
end
